package com.dao.impl;

import java.util.List;

import com.bo.DemandeAttestation;
import com.dao.DemandeAttestationDAO;
import com.dao.exceptions.EntityNotFoundException;

public class DemandeAttestationDaoImpl extends GenericDaoImpl<DemandeAttestation,Long> implements DemandeAttestationDAO{

	public DemandeAttestationDaoImpl() {
		super(DemandeAttestation.class);
	}
	
	public DemandeAttestationDaoImpl(Class<DemandeAttestation> pPersistentClass) {
		super(pPersistentClass);
	}

	public List<DemandeAttestation> findbyCNE(String CNE) throws EntityNotFoundException {
		List<DemandeAttestation> liste=getHibernateTemplate().find("from DemandeAttestation where cne="+CNE);
		if(liste==null) throw new EntityNotFoundException();
		else return liste;
	}
	

}
